package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * SimulatorTaskDoc generated by hbm2java
 */
@Entity
@Table(name = "simulator_task_doc")
public class SimulatorTaskDoc implements java.io.Serializable {

	private Long id;
	private UserBaseInfo userBaseInfoByOperatorId;
	private AirplaneNumber airplaneNumber;
	private Organize organize;
	private UserBaseInfo userBaseInfoByCreaterId;
	private String taskDocNum;
	private Date taskDocDate;
	private Integer flightTime;
	private Date createTime;
	private Date operateTime;
	private boolean fullSimulator;
	private byte taskDocType;
	private boolean historyFlag;
	private boolean backupFlag;
	private Set<SimulatorTaskDocDetails> simulatorTaskDocDetailses = new HashSet<SimulatorTaskDocDetails>(
			0);

	public SimulatorTaskDoc() {
	}

	public SimulatorTaskDoc(String taskDocNum, Date createTime,
			boolean fullSimulator, byte taskDocType, boolean historyFlag,
			boolean backupFlag) {
		this.taskDocNum = taskDocNum;
		this.createTime = createTime;
		this.fullSimulator = fullSimulator;
		this.taskDocType = taskDocType;
		this.historyFlag = historyFlag;
		this.backupFlag = backupFlag;
	}

	public SimulatorTaskDoc(UserBaseInfo userBaseInfoByOperatorId,
			AirplaneNumber airplaneNumber, Organize organize,
			UserBaseInfo userBaseInfoByCreaterId, String taskDocNum,
			Date taskDocDate, Integer flightTime, Date createTime,
			Date operateTime, boolean fullSimulator, byte taskDocType,
			boolean historyFlag, boolean backupFlag,
			Set<SimulatorTaskDocDetails> simulatorTaskDocDetailses) {
		this.userBaseInfoByOperatorId = userBaseInfoByOperatorId;
		this.airplaneNumber = airplaneNumber;
		this.organize = organize;
		this.userBaseInfoByCreaterId = userBaseInfoByCreaterId;
		this.taskDocNum = taskDocNum;
		this.taskDocDate = taskDocDate;
		this.flightTime = flightTime;
		this.createTime = createTime;
		this.operateTime = operateTime;
		this.fullSimulator = fullSimulator;
		this.taskDocType = taskDocType;
		this.historyFlag = historyFlag;
		this.backupFlag = backupFlag;
		this.simulatorTaskDocDetailses = simulatorTaskDocDetailses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "OPERATOR_ID")
	public UserBaseInfo getUserBaseInfoByOperatorId() {
		return this.userBaseInfoByOperatorId;
	}

	public void setUserBaseInfoByOperatorId(
			UserBaseInfo userBaseInfoByOperatorId) {
		this.userBaseInfoByOperatorId = userBaseInfoByOperatorId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PLANE_NUMBER_ID")
	public AirplaneNumber getAirplaneNumber() {
		return this.airplaneNumber;
	}

	public void setAirplaneNumber(AirplaneNumber airplaneNumber) {
		this.airplaneNumber = airplaneNumber;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ORGANIZE_ID")
	public Organize getOrganize() {
		return this.organize;
	}

	public void setOrganize(Organize organize) {
		this.organize = organize;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "CREATER_ID")
	public UserBaseInfo getUserBaseInfoByCreaterId() {
		return this.userBaseInfoByCreaterId;
	}

	public void setUserBaseInfoByCreaterId(UserBaseInfo userBaseInfoByCreaterId) {
		this.userBaseInfoByCreaterId = userBaseInfoByCreaterId;
	}

	@Column(name = "TASK_DOC_NUM", nullable = false, length = 12)
	public String getTaskDocNum() {
		return this.taskDocNum;
	}

	public void setTaskDocNum(String taskDocNum) {
		this.taskDocNum = taskDocNum;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "TASK_DOC_DATE", length = 19)
	public Date getTaskDocDate() {
		return this.taskDocDate;
	}

	public void setTaskDocDate(Date taskDocDate) {
		this.taskDocDate = taskDocDate;
	}

	@Column(name = "FLIGHT_TIME")
	public Integer getFlightTime() {
		return this.flightTime;
	}

	public void setFlightTime(Integer flightTime) {
		this.flightTime = flightTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "OPERATE_TIME", length = 19)
	public Date getOperateTime() {
		return this.operateTime;
	}

	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}

	@Column(name = "FULL_SIMULATOR", nullable = false)
	public boolean isFullSimulator() {
		return this.fullSimulator;
	}

	public void setFullSimulator(boolean fullSimulator) {
		this.fullSimulator = fullSimulator;
	}

	@Column(name = "TASK_DOC_TYPE", nullable = false)
	public byte getTaskDocType() {
		return this.taskDocType;
	}

	public void setTaskDocType(byte taskDocType) {
		this.taskDocType = taskDocType;
	}

	@Column(name = "HISTORY_FLAG", nullable = false)
	public boolean isHistoryFlag() {
		return this.historyFlag;
	}

	public void setHistoryFlag(boolean historyFlag) {
		this.historyFlag = historyFlag;
	}

	@Column(name = "BACKUP_FLAG", nullable = false)
	public boolean isBackupFlag() {
		return this.backupFlag;
	}

	public void setBackupFlag(boolean backupFlag) {
		this.backupFlag = backupFlag;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "simulatorTaskDoc")
	public Set<SimulatorTaskDocDetails> getSimulatorTaskDocDetailses() {
		return this.simulatorTaskDocDetailses;
	}

	public void setSimulatorTaskDocDetailses(
			Set<SimulatorTaskDocDetails> simulatorTaskDocDetailses) {
		this.simulatorTaskDocDetailses = simulatorTaskDocDetailses;
	}

}
